1. Technical Field of the Invention
This invention pertains to a system and method for controlling the operation of channel adapter. More particularly, it relates to a system and method for controlling operation of channel adapter adaptively in memory-mapped mode or I/O mode.
2. Background Art
Device drivers are programs or routines which control or manage the flow of data to and from I/O devices. The drivers form part of and interact with other portions of an operating system. An operating system normally includes a basic set of device drivers for I/O devices, such as a keyboard, fixed and floppy disks, display, and printer, commonly used in personal computers.
Because of minor differences in implementation of the IBM Micro Channel specification, for example, it is often the case that performance of a given Micro Channel adapter may be better when accessed as a memory device rather than when accessed as an I/O device using Intel IN and OUT instructions. For some systems, the converse is true. For example, some adapters perform better in a RISC System/6000 machine in I/O space while, in a Personal System/2 machine, memory-mapped access gives better performance.
In addition, certain types of operations may be more efficient in one mode, while other operations may be performed more efficiently in the other. For example, a given interconnection adapter when used in a given system may perform output operations more efficiently (faster and with less CPU use) in I/O mode while input operations are best performed in memory-mapped mode.
Consequently, there is a need for a system and method whereby the system configuration can be tailored for optimum performance, selecting memory-mapped mode when appropriate, or I/O mode when it would perform better, and also to change modes on-the-fly for certain types of applications.
M. W. Dotson, et al. teach a system for switchable mapping of I/O card registers into I/O space or memory space. See IBM Technical Disclosure Bulletin, Vol. 37 No. 1 January 1994, pp. 317-18, the teachings of which are incorporated herein by reference. Dotson et al teach that an adapter can be made that has either memory-mapped or I/O addressability.
Device driver design heretofore has been such that code is implemented according to the access type supported by the adapter, which is typically either memory-mapped or I/O. With an I/O card register switchable to I/O space or memory map mode, there is a need in the art for a software system and method that will most effectively utilize that capability by providing a device driver that can transparently support any access mode, choosing dynamically, or statically at system configuration time, which mode it will operate in, without modifying the software in order to accommodate the alternate mode.
It is an object of the invention to provide for optimum control of a bimodal I/O adapter.
It is a further object of the invention to provide a system and method for controlling the operation of a bimodal adapter in a manner substantially transparent to user code (except, in some applications, for the purpose of switching modes.)
It is a further object of the invention to provide a system and method whereby the system configuration can be tailored for optimum performance, selecting memory-mapped mode when appropriate, or I/O mode when it would perform better, and also to change modes on-the-fly for certain types of applications.